Improve the handling of broken situations. (#427899, Francesco Montorsi)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 9 Jul 2007 20:22:16 +0000 (20:22 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 9 Jul 2007 20:22:16 +0000 (20:22 +0000)
2007-07-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkframe.c (gtk_frame_size_allocate): Improve the
        handling of broken situations.  (#427899, Francesco Montorsi)

svn path=/trunk/; revision=18422

ChangeLog
gtk/gtkframe.c

index 44e898efdbd267c2893a2ff0f94676bc69e380ff..e875da455689f88a86ee2e72a9e53d444f0d3493 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkframe.c (gtk_frame_size_allocate): Improve the
+       handling of broken situations.  (#427899, Francesco Montorsi)
+
 2007-07-09  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkviewport.c (gtk_viewport_size_request): Changed size 
index e395f1fe1de2edda120ab0109a07e038f9dda60a..2e57baa93096f9fdaf217e662164cd5df521642a 100644 (file)
@@ -676,7 +676,7 @@ gtk_frame_size_allocate (GtkWidget     *widget,
       
       child_allocation.x = frame->child_allocation.x + LABEL_SIDE_PAD +
        (frame->child_allocation.width - child_requisition.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_PAD;
-      child_allocation.width = child_requisition.width;
+      child_allocation.width = MIN (child_requisition.width, new_allocation.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD);
 
       child_allocation.y = frame->child_allocation.y - MAX (child_requisition.height, widget->style->ythickness);
       child_allocation.height = child_requisition.height;